const express = require("express");
const cors = require("cors");

const app = express();
app.use(cors());

//简单请求
app.get("/api/get", (req, res) => {
  res.send("hello express")
})

app.post("/api/post", (req, res) => {
  res.send("hello express")
})

//预检请求
app.delete("/api/delete", (req, res) => {
  res.send("hello express")
})

app.listen(8000, () => {
  console.log("服务器启动成功");
})